In common-law countries, a legal officer who is the chief representative of a regional or national government in courtroom proceedings; sometimes a deputy of the attorney general.